import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import register from '@/components/register'
import login from '@/components/login'
import movie from '@/components/movie'
import product from '@/components/product'
import search from '@/components/search'
import beanindex from '@/components/beanindex'
import item from '@/components/item'
import confirm from '@/components/confirmorder'
import music from '@/components/music'
import details from '@/components/details'
import reading from '@/components/reading'
import xiangqing from '@/components/xiangqing'
import sousuo from '@/components/sousuo'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/movie',
      name: 'movie',
      component: movie
    },
    {
      path: '/product/:mid',
      name: 'product',
      component: product
    },
    {
      path: '/search/:keyword',
      name: 'search',
      component: search
    }, {
      path: '/beanindex',
      name: 'beanindex',
      component: beanindex
    }, {
      path: '/item/:proname/:price',
      name: 'item',
      component: item
    },
    {
      path: '/confirmorder/:proname/:price/:num',
      name: 'confirmorder',
      component: confirm
    },
    {
      path: '/music',
      name: 'music',
      component: music
    },
    {
      path: '/details/:id',
      name: 'details',
      component: details
    },
    {
      path: '/reading',
      name: 'reading',
      component: reading
    }, {
      path: '/xiangqing/:id',
      name: 'xiangqing',
      component: xiangqing
    }, {
      path: '/sousuo/:name',
      name: 'sousuo',
      component: sousuo
    }
  ]
})
